//
// Created by lwj12 on 24-7-21.
//

#ifndef HEAP_H
#define HEAP_H

#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<assert.h>
#include<time.h>
#include<string.h>

typedef int DataType;
typedef struct Heap
{
    DataType* h;
    size_t sz, capacity;
}Heap;

void HPInit(Heap* php);
void HPDestroy(Heap* php);

void HPPush(Heap* php, DataType val);
void HPPop(Heap* php);

DataType HPTop(Heap* php);
bool HPEmpty(Heap* php);

void AdjustDown(DataType* a, size_t sz, size_t father);
void Swap(DataType* h1, DataType* h2);

#endif //HEAP_H
